package JavaSEAdvance.day05_API;

import java.util.Arrays;

/**
 * @author Xiao
 * @date 2021/7/21
 */
public class D505_IntegerDemo02 {
    /**
     * 求最小值：
     * String str = "46 27 91 38 50";
     */
    public static void main(String[] args) {
        String str = "46 27 91 38 50";
        String[] str1 = str.split(" ");
        int[] arr = new int[str1.length];
        for (int i = 0; i < str1.length; i++) {
            arr[i] = Integer.parseInt(str1[i]);
        }
        System.out.println(Arrays.toString(arr));
        Arrays.sort(arr);
        System.out.println(arr[0]);
        System.out.println(Arrays.toString(arr));
    }
}
